package com.heima.user.feign;

import com.heima.common.dto.ResponseResult;
import com.heima.user.dto.ApAuthor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author WSJ
 * @Date 2022-03-11-20:25
 * @Version 1.0 （版本号）
 */

@FeignClient("leadnews-article")
public interface ArticleFeign {

    @PostMapping("/api/v1/author")
    public ResponseResult<ApAuthor> save(@RequestBody ApAuthor apAuthor);

    @GetMapping("/api/v1/author/{id}")
    public ResponseResult<ApAuthor> findById(@PathVariable("id") Integer id);
}
